package com.cloudinnov.controller.api;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cloudinnov.dao.mongo.EnvironmentMongoDBDao;
import com.cloudinnov.model.Environment;

@Controller
@RequestMapping("/test")
public class MonTestController {

	@Autowired 
	EnvironmentMongoDBDao environmentMongoDBDao;
	@Autowired
	MongoTemplate mongoTemplate;
	
	 
	
	@RequestMapping("/mongo")
	@ResponseBody
	public String testMongo(String date){
		/*LightDetectorData lightDetectorData=new LightDetectorData();
		lightDetectorData.setEquipCode("EQMCDXC");
		lightDetectorData.setLightValue("2000.0");
		lightDetectorData.setTimeMillis(System.currentTimeMillis()+"");
		Date da = new Date(date);
		lightDetectorData.setUtcTime(da);
		mongoTemplate.insert(lightDetectorData);*/
		return "s啊啊啊";
	}
	
}
